<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    // web存储-相当于数据库-两种机制如下
    // sessionStorage--始于浏览器，终于浏览器关闭
    // localStorage--不手动删除，一直存储
    // 1.存
    localStorage.setItem('name','zhangsan')
    // 2.取
    console.log(localStorage.getItem("name"))
    // 3.删
    localStorage.removeItem("name")
    console.log(localStorage.getItem("name"))
    // 数组/对象的web存储
    // 存-value进行序列化
    // 取-value进行反序列化
</script>
</html>